<template>
  <div>
    <Header></Header>
    <div class="mybody clearfix">
      <div class="home-page">
        <div class="hp-left fl" v-if="identity == 0">
          <el-drawer
            title="用户个人信息修改"
            :visible.sync="isUpdating"
            :direction="direction"
            :before-close="handleClose"
          >
            <el-form ref="userInfo" :model="userInfo" label-width="80px">
              <el-form-item label="个人头像">
                <el-upload
                  class="avatar-uploader"
                  :action="uploadUrl"
                  :show-file-list="false"
                  :on-success="onUploadSuccess"
                >
                  <img
                    v-if="userInfo.avartarurl == null"
                    src="@/assets/未登录.png"
                    class="avatar"
                  />
                  <img
                    v-if="userInfo.avartarurl != null"
                    :src="userInfo.avartarurl"
                    class="avatar"
                  />
                </el-upload>
              </el-form-item>
              <el-form-item label="昵称">
                <el-input v-model="userInfo.nickname"></el-input>
              </el-form-item>
              <el-form-item label="密码" prop="pass">
                <el-input
                  type="password"
                  v-model="userInfo.password"
                  autocomplete="off"
                ></el-input>
              </el-form-item>
              <el-form-item label="身份">
                <el-radio-group v-model="userInfo.identity">
                  <el-radio :label="0" disabled>学生</el-radio>
                  <el-radio :label="1" disabled>老师</el-radio>
                  <el-radio :label="2" disabled>管理员</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="姓名">
                <el-input v-model="userInfo.name" disabled></el-input>
              </el-form-item>
              <el-form-item label="学号">
                <el-input v-model="userInfo.studentid" disabled></el-input>
              </el-form-item>
              <el-form-item label="年级">
                <el-input v-model="userInfo.grade" disabled></el-input>
              </el-form-item>
              <el-form-item label="专业">
                <el-input v-model="userInfo.major" disabled></el-input>
              </el-form-item>
              <el-form-item label="兴趣标签">
                <el-tag
                  class="user-info-content-tag"
                  v-for="tag in userInfo.tags"
                  :key="tag.tagName"
                  closable
                  type="success"
                  @close="removeTag(userInfo, tag)"
                >
                  {{ tag }}
                </el-tag>
                <el-input
                  class="input-new-tag"
                  v-if="inputVisible"
                  v-model="inputValue"
                  ref="saveTagInput"
                  size="small"
                  placeholder="按下回车键添加当前标签"
                  @keyup.enter.native="handleInputConfirm(userInfo)"
                  @blur="handleInputConfirm"
                >
                </el-input>
                <el-button
                  v-else
                  class="button-new-tag"
                  size="small"
                  @click="showInput"
                  >+ New Tag</el-button
                >
              </el-form-item>
              <el-form-item label="邮箱">
                <el-input v-model="userInfo.email"></el-input>
              </el-form-item>
              <el-form-item label="QQ">
                <el-input v-model="userInfo.qq"></el-input>
              </el-form-item>
              <el-form-item label="联系电话">
                <el-input v-model="userInfo.telephone"></el-input>
              </el-form-item>

              <el-form-item label="个性签名">
                <el-input
                  type="textarea"
                  v-model="userInfo.signature"
                ></el-input>
              </el-form-item>
              <el-form-item>
                <el-button
                  type="primary"
                  v-if="isSelf == true"
                  @click="onSubmit"
                  >立即修改</el-button
                >
                <el-button>取消</el-button>
              </el-form-item>
            </el-form>
          </el-drawer>
          <!-- :class="[{ 'lf-top': isSelf }, { 'lf-top-nonSelf': !isSelf }]" -->
          <div class="lf-top" v-if="userInfo != null">
            <div class="profile">
              <span class="fl">个人资料</span>
              <span class="fr"
                ><a
                  v-if="isSelf == true"
                  class="bluecolor"
                  href="#"
                  @click="isUpdating = true"
                  >修改</a
                ></span
              >
            </div>
            <img class="hp-sculpture" :src="userInfo.avartarurl" alt="" />
            <h3>{{ userInfo.nickname }}</h3>
            <div class="level_sex">
              <i class="el-icon-male sex fl"></i>
              <!-- <i class="el-icon-female sex"></i> -->
              <span class="level fl">lv1</span>
            </div>
            <p>认证信息：学生</p>
            <el-row v-if="isSelf == false">
              <el-col :span="24" style="text-align: center">
                <el-popover placement="top" width="160" v-model="visible">
                  <p>你确定要添加其为好友吗？</p>
                  <div style="text-align: right; margin: 0">
                    <el-button size="mini" type="text" @click="visible = false"
                      >取消</el-button
                    >
                    <el-button type="primary" size="mini" @click="addFriend"
                      >确定</el-button
                    >
                  </div>
                  <el-button
                    slot="reference"
                    size="mini"
                    style="margin-right: 15px"
                    >加为好友</el-button
                  >
                </el-popover>

                <el-button type="primary" size="mini">发起会话</el-button>
              </el-col>
            </el-row>
          </div>
          <div class="lf-bottom" v-if="userInfo != null">
            <!-- <el-descriptions direction="vertical" :column="2" border>
              <el-descriptions-item label="用户名">ssf</el-descriptions-item>
              <el-descriptions-item label="手机号"
                >18100000000</el-descriptions-item
              >
              <el-descriptions-item label="居住地" :span="2"
                >苏州市</el-descriptions-item
              >
              <el-descriptions-item label="备注">
                <el-tag size="small">学生</el-tag>
              </el-descriptions-item>
              <el-descriptions-item label="联系地址"
                >江苏省苏州市吴中区吴中大道 1188 号</el-descriptions-item
              >
            </el-descriptions> -->
            <el-row>
              <el-col :span="6" class="user-info-label">姓名：</el-col>
              <el-col :span="18">{{ userInfo.name }}</el-col>
            </el-row>
            <el-row>
              <el-col :span="6" class="user-info-label">学号：</el-col>
              <el-col :span="18">{{ userInfo.studentid }}</el-col>
            </el-row>
            <el-row>
              <el-col :span="6" class="user-info-label">年级：</el-col>
              <el-col :span="18">{{ userInfo.grade }}级</el-col>
            </el-row>
            <el-row>
              <el-col :span="6" class="user-info-label">专业：</el-col>
              <el-col :span="18">{{ userInfo.major }}</el-col>
            </el-row>
            <el-row>
              <el-col :span="24" class="user-info-label">个性签名：</el-col>
            </el-row>
            <el-row>
              <el-col :span="24" style="margin-bottom: 1rem">{{
                userInfo.signature
              }}</el-col>
            </el-row>
            <el-row>
              <el-col :span="24" class="user-info-label">兴趣标签:</el-col>
            </el-row>
            <el-row>
              <el-col :span="24" class="user-info-label">
                <el-tag
                  v-for="tag in userInfo.tags"
                  :key="tag"
                  type="success"
                  class="user-info-content-tag"
                  >{{ tag }}</el-tag
                >
              </el-col>
            </el-row>
            <el-collapse style="margin-top: 1rem">
              <el-collapse-item title="联系方式">
                <el-row>
                  <el-col :span="6" class="user-info-label-contact"
                    >邮箱</el-col
                  >
                  <el-col :span="18">{{ userInfo.email }}</el-col>
                </el-row>
                <el-row>
                  <el-col :span="6" class="user-info-label-contact">QQ</el-col>
                  <el-col :span="18">{{ userInfo.qq }}</el-col>
                </el-row>
                <el-row>
                  <el-col :span="6" class="user-info-label-contact"
                    >电话号码</el-col
                  >
                  <el-col :span="18">{{ userInfo.telephone }}</el-col>
                </el-row>
              </el-collapse-item>
            </el-collapse>
          </div>
        </div>
        <div class="hp-left fl" v-if="identity == 1">
          <el-drawer
            title="用户个人信息修改"
            :visible.sync="isUpdating"
            :direction="direction"
            :before-close="handleClose"
          >
            <el-form ref="userInfo" :model="teacherInfo" label-width="80px">
              <el-form-item label="个人头像">
                <el-upload
                  class="avatar-uploader"
                  :action="uploadUrl"
                  :show-file-list="false"
                  :on-success="onUploadSuccess"
                >
                  <img
                    v-if="userInfo.avartarurl == null"
                    src="@/assets/未登录.png"
                    class="avatar"
                  />
                  <img
                    v-if="userInfo.avartarurl != null"
                    :src="userInfo.avartarurl"
                    class="avatar"
                  />
                </el-upload>
              </el-form-item>
              <el-form-item label="昵称">
                <el-input v-model="teacherInfo.nickName"></el-input>
              </el-form-item>
              <el-form-item label="密码" prop="pass">
                <el-input
                  type="password"
                  v-model="userInfo.password"
                  autocomplete="off"
                ></el-input>
              </el-form-item>
              <el-form-item label="身份">
                <el-radio-group v-model="teacherInfo.identity">
                  <el-radio :label="0" disabled>学生</el-radio>
                  <el-radio :label="1" disabled>老师</el-radio>
                  <el-radio :label="2" disabled>管理员</el-radio>
                </el-radio-group>
              </el-form-item>
              <el-form-item label="姓名">
                <el-input v-model="teacherInfo.name" disabled></el-input>
              </el-form-item>
              <el-form-item label="职工号">
                <el-input v-model="teacherInfo.teacherId" disabled></el-input>
              </el-form-item>
              <el-form-item label="单位">
                <el-input v-model="teacherInfo.unit" disabled></el-input>
              </el-form-item>
              <el-form-item label="职务">
                <el-input v-model="teacherInfo.occupation" disabled></el-input>
              </el-form-item>
              <el-form-item label="职务">
                <el-input v-model="teacherInfo.title"></el-input>
              </el-form-item>
              <el-form-item label="研究方向">
                <el-input v-model="teacherInfo.major"></el-input>
              </el-form-item>
              <el-form-item label="兴趣标签">
                <el-tag
                  class="user-info-content-tag"
                  v-for="tag in teacherInfo.tags"
                  :key="tag.tagName"
                  closable
                  type="success"
                  @close="removeTag(teacherInfo, tag)"
                >
                  {{ tag }}
                </el-tag>
                <el-input
                  class="input-new-tag"
                  v-if="inputVisible"
                  v-model="inputValue"
                  ref="saveTagInput"
                  size="small"
                  placeholder="按下回车键添加当前标签"
                  @keyup.enter.native="handleInputConfirm(teacherInfo)"
                  @blur="handleInputConfirm"
                >
                </el-input>
                <el-button
                  v-else
                  class="button-new-tag"
                  size="small"
                  @click="showInput"
                  >+ New Tag</el-button
                >
              </el-form-item>
              <el-form-item label="邮箱">
                <el-input v-model="teacherInfo.email"></el-input>
              </el-form-item>
              <el-form-item label="QQ">
                <el-input v-model="teacherInfo.qq"></el-input>
              </el-form-item>
              <el-form-item label="联系电话">
                <el-input v-model="teacherInfo.telephone"></el-input>
              </el-form-item>

              <el-form-item label="个性签名">
                <el-input
                  type="textarea"
                  v-model="teacherInfo.signature"
                ></el-input>
              </el-form-item>
              <el-form-item>
                <el-button type="primary" @click="onSubmit">立即修改</el-button>
                <el-button>取消</el-button>
              </el-form-item>
            </el-form>
          </el-drawer>
          <div class="lf-top" v-if="userInfo != null">
            <div class="profile">
              <span class="fl">个人资料</span>
              <span class="fr"
                ><a
                  v-if="isSelf == true"
                  class="bluecolor"
                  href="#"
                  @click="isUpdating = true"
                  >修改</a
                ></span
              >
            </div>
            <img class="hp-sculpture" :src="teacherInfo.avartarurl" alt="" />
            <h3>{{ teacherInfo.name }}</h3>
            <div class="level_sex">
              <i class="el-icon-male sex fl"></i>
              <!-- <i class="el-icon-female sex"></i> -->
              <span class="level fl">lv1</span>
            </div>
            <p>认证信息：教师</p>
            <el-row v-if="isSelf == false">
              <el-col :span="24" style="text-align: center">
                <el-button size="mini">加为好友</el-button>
                <el-button type="primary" size="mini">发起会话</el-button>
              </el-col>
            </el-row>
          </div>
          <div class="lf-bottom">
            <el-row>
              <el-col :span="6" class="user-info-label">姓名：</el-col>
              <el-col :span="18">{{ teacherInfo.name }}</el-col>
            </el-row>
            <el-row>
              <el-col :span="6" class="user-info-label">职工号：</el-col>
              <el-col :span="18">{{ teacherInfo.teacherId }}</el-col>
            </el-row>
            <el-row>
              <el-col :span="6" class="user-info-label">单位：</el-col>
              <el-col :span="18">{{ teacherInfo.unit }}</el-col>
            </el-row>
            <el-row>
              <el-col :span="6" class="user-info-label">职务：</el-col>
              <el-col :span="18"> {{ teacherInfo.occupation }}</el-col>
            </el-row>
            <el-row>
              <el-col :span="6" class="user-info-label">职称：</el-col>
              <el-col :span="18"> {{ teacherInfo.title }}</el-col>
            </el-row>
            <el-row>
              <el-col :span="24" class="user-info-label">研究方向：</el-col>
            </el-row>
            <el-row>
              <el-col :span="24" style="margin-bottom: 1rem">{{
                teacherInfo.major
              }}</el-col>
            </el-row>
            <el-row>
              <el-col :span="24" class="user-info-label">个性签名：</el-col>
            </el-row>

            <el-row>
              <el-col :span="24" style="margin-bottom: 1rem">{{
                teacherInfo.signature
              }}</el-col>
            </el-row>
            <el-row>
              <el-col :span="24" class="user-info-label">兴趣标签:</el-col>
            </el-row>
            <el-row>
              <el-col :span="24" class="user-info-label">
                <el-tag
                  type="success"
                  v-for="tag in tags"
                  :key="tag"
                  class="user-info-content-tag"
                  >{{ tag }}</el-tag
                >
              </el-col>
            </el-row>
            <el-collapse style="margin-top: 1rem">
              <el-collapse-item title="联系方式">
                <el-row>
                  <el-col :span="6" class="user-info-label-contact"
                    >邮箱</el-col
                  >
                  <el-col :span="18">{{ teacherInfo.email }}</el-col>
                </el-row>
                <el-row>
                  <el-col :span="6" class="user-info-label-contact">QQ</el-col>
                  <el-col :span="18">{{ teacherInfo.qq }}</el-col>
                </el-row>
                <el-row>
                  <el-col :span="6" class="user-info-label-contact"
                    >电话号码</el-col
                  >
                  <el-col :span="18">{{ teacherInfo.telephone }}</el-col>
                </el-row>
              </el-collapse-item>
            </el-collapse>
          </div>
        </div>
        <div class="hp-right fl">
          <el-menu class="el-menu-demo" mode="horizontal" default-active="1">
            <el-menu-item index="1" @click="showMsg = false"
              ><router-link to="/homepage/mypost"
                >帖子</router-link
              ></el-menu-item
            >
            <el-menu-item
              index="2"
              @click="showMsg = false"
              v-if="isSelf == true"
            >
              <router-link to="/homepage/mypraise">点赞</router-link>
            </el-menu-item>
            <el-menu-item
              index="3"
              @click="showMsg = false"
              v-if="isSelf == true"
              ><router-link to="/homepage/mycomment">评论</router-link>
            </el-menu-item>
            <el-menu-item
              index="4"
              @click="showMsg = false"
              v-if="isSelf == true"
              ><router-link to="/homepage/friend">好友</router-link>
            </el-menu-item>
            <el-menu-item
              index="5"
              @click="showMsg = true"
              v-if="isSelf == true"
              ><router-link to="/homepage/letter">消息</router-link>
            </el-menu-item>
            <div style="margin: 6px" v-if="showMsg == true">
              <el-badge :value="commentCount" class="item">
                <el-button size="small"
                  ><router-link to="/homepage/letter/comment"
                    >评论</router-link
                  ></el-button
                >
              </el-badge>
              <el-badge :value="likeCount" class="item">
                <el-button size="small"
                  ><router-link to="/homepage/letter/praise"
                    >点赞</router-link
                  ></el-button
                >
              </el-badge>
              <el-badge :value="friendCount" class="item" type="primary">
                <el-button size="small"
                  ><router-link to="/homepage/letter/friend"
                    >好友申请</router-link
                  ></el-button
                >
              </el-badge>
              <el-badge :value="chatCount" class="item" type="warning">
                <el-button size="small"
                  ><router-link to="/homepage/letter/chat"
                    >私信</router-link
                  ></el-button
                >
              </el-badge>
            </div>
          </el-menu>

          <router-view></router-view>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import personApi from "@/api/personApi";
export default {
  name: "homepage",
  data() {
    return {
      visible: false,
      isSelf: true,
      identity: 1,
      isUpdating: false,
      direction: "ltr",
      uploadUrl: "http://localhost:8081/file/addFile",
      avartarurl:
        "https://yygh-zjut.oss-cn-hangzhou.aliyuncs.com/76f62cf207906149ba614837eee3ae6e.jpg",
      userInfo: {
        studentId: "202003150624",
        nickName: "Ssf",
        password: "",
        avartarurl:
          "https://yygh-zjut.oss-cn-hangzhou.aliyuncs.com/76f62cf207906149ba614837eee3ae6e.jpg",
        identity: 0,
        name: "盛上峰",
        grade: "2020",
        major: "数字媒体与技术",
        tags: ["前端", "开发", "情感"],
        email: "ssf@zjut.stu.cn",
        qq: "2192261151",
        telephone: "18767175883",
        signature: "不要总在过去的回忆里缠绵，昨天的太阳，晒不干今天的衣裳。",
      },
      teacherInfo: {
        teacherId: "200803150624",
        nickName: "Mike",
        password: "",
        avartarurl:
          "https://yygh-zjut.oss-cn-hangzhou.aliyuncs.com/mike-avartar.jpg",
        identity: 1,
        name: "李迈克",
        unit: "计算机科学与技术学院、软件学院",
        occupation: "智能计算研究所所长",
        title: "副教授",
        major: "计算机视觉、指纹识别",
        tags: ["计算机视觉", "指纹识别", "多模态"],
        email: "mikel@zjut.stu.cn",
        qq: "1271263375",
        telephone: "18767175883",
        signature: "不要总在过去的回忆里缠绵，昨天的太阳，晒不干今天的衣裳。",
      },
      inputVisible: "",
      inputValue: "",
      showMsg: false,
      chatCount: 0,
      commentCount: 0,
      likeCount: 0,
      friendCount: 0,
    };
  },
  created() {
    var username = sessionStorage.getItem("username");
    if (
      this.$route.params.visitedUserId &&
      this.$route.params.visitedUserId != username
    ) {
      this.isSelf = false;
      this.visitedUserId = this.$route.params.visitedUserId;
      this.identity = this.$route.params.identity;
      sessionStorage.setItem("visitedUserId", this.visitedUserId);
      sessionStorage.setItem("visitedIdentity", this.identity);
      this.getPersonById(this.visitedUserId, this.identity);
    } else {
      this.isSelf = true;
      this.getPersonInfo();
      for (var i = 1; i < 5; i++) {
        if (i == 3) continue;
        this.getMessageCount(i);
      }
    }
  },
  methods: {
    removeTag(info, tag) {
      info.tags.splice(this.userInfo.tags.indexOf(tag), 1);
    },
    showInput() {
      this.inputVisible = true;
      this.$nextTick((_) => {
        this.$refs.saveTagInput.$refs.input.focus();
      });
    },
    handleInputConfirm(info) {
      let inputValue = this.inputValue;
      if (inputValue) {
        info.tags.push(inputValue);
      }
      this.inputVisible = false;
      this.inputValue = "";
    },
    getPersonInfo() {
      personApi.getPersonInfo().then((response) => {
        this.identity = response.data[0].identity;
        if (this.identity == 0) {
          this.userInfo = response.data[0];
          this.userInfo.tags = this.userInfo.tags.split(",");
        } else {
          this.teacherInfo = response.data[0];
          this.teacherInfo.tags = this.teacherInfo.tags.split(",");
        }
      });
    },
    getPersonById(userId, identity) {
      personApi.getPersonById(userId, identity).then((response) => {
        if (identity == 0) {
          this.userInfo = response.data.data[0];
          this.userInfo.tags = this.userInfo.tags.split(",");
        } else {
          this.teacherInfo = response.data.data[0];
          console.log(this.teacherInfo);
          this.teacherInfo.tags = this.teacherInfo.tags.split(",");
        }
      });
    },
    handleClose() {
      this.isUpdating = false;
    },
    handleAvatarSuccess() {},
    beforeAvatarUpload() {},
    onSubmit() {
      var tags_tmp = "";
      if (this.identity == 0) {
        for (var i = 0; i < this.userInfo.tags.length; i++) {
          if (this.userInfo.tags[i] != "") tags_tmp += this.userInfo.tags[i];
          if (i != this.userInfo.tags.length - 1) tags_tmp += ",";
        }
        var studentInfo = JSON.parse(JSON.stringify(this.userInfo));
        studentInfo.tags = tags_tmp;
        this.updateStudentInfo(studentInfo);
        this.isUpdating = false;
      } else if (this.identity == 1) {
        for (var i = 0; i < this.teacherInfo.tags.length; i++) {
          if (this.teacherInfo.tags[i] != "")
            tags_tmp += this.teacherInfo.tags[i];
          if (i != this.teacherInfo.tags.length - 1) tags_tmp += ",";
        }
        var teacherInfo = JSON.parse(JSON.stringify(this.teacherInfo));
        teacherInfo.tags = tags_tmp;
        this.updateStudentInfo(teacherInfo);
        this.isUpdating = false;
      }
    },
    updateStudentInfo(studentInfo) {
      personApi.updateStudentInfo(studentInfo).then((response) => {});
    },
    updateTeacherInfo(teacherInfo) {
      personApi.updateTeacherInfo(teacherInfo).then((response) => {});
    },
    //触发submit函数后将fileList中的文件逐个上传并逐个触发该函数，作用是更新fileList为成功上传后的文件列表同时将后端返回的URL封装
    onUploadSuccess(attachmentUrl, file, fileList) {
      if (this.identity == 0) {
        this.userInfo.avartarurl = attachmentUrl;
      } else if (this.identity == 1) {
        this.teacherInfo.avartarurl = attachmentUrl;
      }
    },
    addFriend() {
      this.visible = false;
      personApi.addFriend(this.visitedUserId).then((response) => {});
    },
    getMessageCount(type) {
      personApi.getMessageCount(type).then((response) => {
        if (type == 0) {
          this.chatCount = response.data;
        } else if (type == 1) {
          this.commentCount = response.data;
        } else if (type == 2) {
          this.likeCount = response.data;
        } else if (type == 4) {
          this.friendCount = response.data;
        }
      });
    },
  },
  components: {},
};
</script>

<style scoped>
.mybody {
  margin: 0 auto;
  width: 90%;
}
.home-page {
  height: 650px;
  margin-top: 20px;
  /* background-color: pink; */
}
.bluecolor {
  color: #409eff;
}
.level_sex {
  height: 20px;
  width: 60px;
  margin: 0 auto;
  margin-bottom: 5px;
  text-align: center;
  line-height: 20px;
}
/*左侧部分 */

.hp-left {
  width: 20%;
  height: 650px;
  margin-right: 10px;
  /* background-color: blue; */
}
.lf-top {
  height: 37%;
  border-radius: 5px;
  /* padding-top: 30px; */
  background-color: white;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
}
.lf-top-nonSelf {
  height: 37%;
  border-radius: 5px;
  /* padding-top: 30px; */
  background-color: white;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
}
.profile {
  height: 20px;
  padding: 10px 15px;
}
.hp-sculpture {
  display: block;
  height: 100px;
  width: 100px;
  border-radius: 50px;
  margin-left: 90px;
}
.lf-top h3 {
  font-size: 14px;
  font-weight: normal;
  text-align: center;
  margin: 10px 0;
  /* color: #aba39d; */
  /* color: #409eff; */
}
.lf-top p {
  text-align: center;
  color: #409eff;
}
.sex {
  /* float: left; */
  font-size: 20px;
}
.level {
  height: 20px;
  color: white;
  font-size: 10.5px;
  background-color: #ff5722;
  border-radius: 3px;
  margin-left: 8px;
  padding: 0 5px;
}
.lf-bottom {
  min-height: 63%;
  padding: 20px;
  border-radius: 5px;
  margin-top: 10px;
  background-color: white;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
}

/* 个人信息展示 */
.user-info-label {
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
}
.user-info-content-tag {
  margin-right: 0.5rem;
}
.user-info-label-contact {
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 0.25rem;
}

/* 个人信息修改 */
.avatar-uploader {
  width: 125px;
  height: 125px;
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader {
  border-color: #409eff;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 125px;
  height: 125px;
  line-height: 125px;
  text-align: center;
}
.avatar {
  width: 125px;
  height: 125px;
  border-radius: 6px;
  display: block;
}
/*右侧部分 */
.hp-right {
  width: 78%;
  height: 650px;
  overflow-y: scroll;
  border-radius: 5px;
  background-color: white;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
}
/* 消息标签 */
.item {
  margin-top: 10px;
  margin-right: 40px;
}
/*具体帖子*/
.inv-item {
  height: 150px;
  /* background: pink; */
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  margin: 10px;
  padding: 5px 0;
}
/*帖子头部*/
.inv-item .hd {
  height: 40px;
  line-height: 40px;
}
.inv-item .hd span {
  height: 16px;
  line-height: 16px;
  border-right: 1px solid rgba(0, 0, 0, 0.3);
  margin: 12px 0;
  padding: 0 8px;
}
.inv-img {
  height: 40px;
  width: 40px;
  border-radius: 20px;
}
/*帖子body*/
.inv-item .bd {
  margin: 10px 0;
}
.fd-item {
  margin-right: 20px;
}
</style>
